// @ts-check
import withNuxt from './.nuxt/eslint.config.mjs'
import prettierConfig from 'eslint-config-prettier'
import prettierPlugin from 'eslint-plugin-prettier'

export default withNuxt(
  {
    // 全局变量配置
    languageOptions: {
      globals: {
        useApiFetch: 'readonly',
      },
    },
  },
  {
    // 忽略文件配置
    ignores: ['node_modules', '.nuxt', '.output', 'dist', '*.log'],
  },
  {
    // Prettier 集成
    plugins: {
      prettier: prettierPlugin,
    },
    rules: {
      ...prettierConfig.rules,
      'prettier/prettier': 'off',
      '@typescript-eslint/no-explicit-any': 'off',
    },
  },
)
